﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FrameMainForm.aspx.cs" Inherits="App_System_FrameMainForm" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>亲和源老年公寓管理系统</title>
    <script language="javascript" src="../../javascript/calendar.js"></script>
    <script type="text/javascript" src="../../ajax/common.ashx"></script>
    <script type="text/javascript" src="../../ajax/Shpm.App.Commons.Utils.CommonAjaxUtils,App_Code.o4dpash6.ashx"></script>
    <script language="javascript" src="../../javascript/commons.aspx"></script>
    <script language="javascript" src="../../javascript/floatingBar.aspx"></script>
    <script language="javascript">
        // mainFrame中出现数组中包含的URL, 将隐藏员工信息栏.
        var GLOBAL_PATHS = new Array(/*"App/System/PortalMainForm.aspx"*/);

        function empChange() {
            var e;
            try {
                // mainFrame中出现数组中包含的URL, 将隐藏员工信息栏.
                var paths = GLOBAL_PATHS;
                var navObj = top.window.mainFrame.getNavigate();
                var pathname = navObj.ownerUrl;

                if( !top.window.topFrame.doDisplayEmp ) {
                    // topFrame 中不包含doDisplayEmp函数则退出函数
                    return;
                }

                for(var i=0; i<paths.length; i++) {
                    if( endsWith(pathname, paths[i]) ) {
                        // 隐藏员工信息栏
                        top.window.topFrame.doDisplayEmp(false);
                        return;
                    }
                }

                // 表示员工信息栏
                top.window.topFrame.doDisplayEmp(true);
            }
            catch(e) {
            }
        }

        function navigateChange() {
            var e;
            try {
                // mainFrame中出现数组中包含的URL, 将隐藏导航栏.
                var paths = GLOBAL_PATHS;
                var navObj = top.window.mainFrame.getNavigate();
                var pathname = navObj.ownerUrl;

                for(var i=0; i<paths.length; i++) {
                    if( endsWith(pathname, paths[i]) ) {
                        // 隐藏导航栏
                        top.window.topFrame.displayNavigate(false);
                        return;
                    }
                }

                
                if( navObj!=null ) {
                    // 显示导航链接
                    top.window.topFrame.displayNavigate(navObj.lnkName, navObj.lnkUrl, navObj.title);
                }
            }
            catch(e) {
                alert(e.message);
            }
        }

        var floatObj = null;
        function frameChange() {
            empChange();
            navigateChange();

            if( floatObj==null ) {
                // floatObj = new FloatBar('float1');
                floatObj = new FloatBar('float1');
            }
            floatObj.createFloatBar(window.frames[1].document);

            // get new personal message
            if (!top.window.topFrame.getNewMessage) {
                alert("wait");
                setTimeout("top.window.topFrame.getNewMessage()",2000);
            }
            if (!top.window.topFrame.getNewAlarmMessage) {
                alert("wait");
                setTimeout("top.window.topFrame.getNewAlarmMessage()",2000);
            }

            top.window.topFrame.getNewMessage(false);

            top.window.topFrame.getNewAlarmMessage(false);

            // get notify message
            if (top.window.topFrame.getNotifyMessage) {                
                top.window.topFrame.getNotifyMessage(false);
            }
        }
    </script>
</head>

<frameset rows="170,*" cols="*" frameborder="no" framespacing="0" border="0">
  <frame src="./TopMainForm.aspx" noresize scrolling="no" name="topFrame" />
  <frame src="./MenuMainForm.aspx" name="mainFrame" onload="frameChange()" />
</frameset>
<noframes><body>
</body>
</noframes>

<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
